﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Hotel.Models.DataAccess;
using Hotel.Models.Entity;

namespace Hotel.Models.Services
{
    public class StaffService
    {
        public static List<Staff> GetListStaff()
        {
            return DAStaff.GetListStaff(0);
        }

        public static Staff GetDetailStaff(int staffID)
        {
            return DAStaff.GetListStaff(staffID)[0];
        }

        public static bool DeleteStaff(int staffID)
        {
            return DAStaff.DeleteStaff(staffID);
        }

        //Insert : isUpdate = false
        //Update : isUpdate = true
        public static bool SaveStaff(Staff staff, bool isUpdate)
        {
            return DAStaff.SaveStaff(staff, isUpdate);
        }
    }
}